 ///
 /// @file    oversee.cc
 /// @author  lemon(haohb13@gmail.com)
 /// @date    2016-03-14 10:49:25
 ///
 
#include <iostream>
using std::cout;
using std::endl;

class Base
{
public:
	int func(int i)
	{
		cout << "Base::func(int)" << endl;
		return _ix;
	}
//private:
protected:
	int _ix;
};


class Derived : public Base
{
public:
	int func()
	{
		cout << "Derived::func()" << endl;
		_ix = 9;//隐藏基类的_ix
		Base::_ix = 22;
		return _ix;
	}
private:
	int _ix;
};

int main(void)
{
	Derived d;
	cout << d.func() << endl;
	//d.func(3);//隐藏，父子类，非虚函数，只要函数名相同
	cout << d.Base::func(3) << endl;//如果要使用父类的同名函数，
	
					//必须使用作用域限定符
}
